package cn.caskm.souvenirshopsystem.domain.po;

import cn.caskm.souvenirshopsystem.utils.DateUtils;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("goods")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品ID
     */
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Integer goodsId;

    /**
     * 发布人ID
     */
    private Integer userId;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 分类ID
     */
    private Integer categoryId;

    /**
     * 简介
     */
    private String goodsDesc;

    /**
     * 价格
     */
    private BigDecimal goodsPrice;

    /**
     * 图片
     */
    private String image;

    /**
     * 0:上架 1:下架
     */
    private String status;

    /**
     * 库存量
     */
    private Integer sellStatus;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = DateUtils.DATE_TIME_FORMAT)
    private LocalDateTime createTime;

    /**
     * 0:未推荐 1:推荐到首页
     */
    private String setIndex;

    /**
     * 发布/求购 地址
     */
    private String address;

    /**
     * 0:未删除 1:删除
     */
    private String deleteStatus;


}
